package org.example;

import org.example.model.TableLineage;

public class DataHubUtil {

    public static String  getDateSet(TableLineage tableLineage, String env){


        FinkConnectorOptionParser finkConnectorOptionParser = FinkConnectorOptionParserWarpper.getFlinkConnectorOptionParser(tableLineage);


        String type = finkConnectorOptionParser.getDataBaseType(tableLineage);

        String database = finkConnectorOptionParser.getDatabaseName(tableLineage);

        String tableName = finkConnectorOptionParser.getTableName(tableLineage);

        return getDateSet(type,database,tableName,env);
    }

    public static String  getDateSet(String type,String database,String tableName,String env){
        return"urn:li:dataset:(urn:li:dataPlatform:"+type+","+database+"."+tableName+","+env+")";
    }


}
